#include <Throwable.hpp>

std::string Exceptions::Throwable::Description = "Exceptions.Throwable";

Exceptions::Throwable::~Throwable() throw()
{
    this->Message.clear();
}

Exceptions::Throwable::Throwable() : Cause(NULL)
{
    this->setMessage(std::string("No message recived"));
}

Exceptions::Throwable::Throwable(std::string message) : Cause(NULL)
{
    this->setMessage(message);
}

Exceptions::Throwable::Throwable(const Throwable& cause) : Cause(&cause)
{
    this->setMessage("No message recived");
}

Exceptions::Throwable::Throwable(std::string message, const Throwable& cause)  : Cause(&cause)
{
    this->setMessage(message);
}
	
std::string Exceptions::Throwable::getMessage()
{
    return this->Message;
}

std::string Exceptions::Throwable::toString() const
{
    return Exceptions::Throwable::Description;
}

void Exceptions::Throwable::setMessage(std::string message)
{
	this->Message = message;
}
